Page({
  data: {
    userInfo: {},
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    tabArr: {
      curHdIndex: 0,
      curBdIndex: 0
    },
    tasks: [
      { id: 1, name: '墨盒修复', date: '2018-12-18', checked: 'true' },
      { id: 2, name: '卡纸故障', date: '2018-12-18', checked: 'true' }
    ],
    alltasks: [
      { id: 1, name: '墨盒修复', date: '2018-12-18', checked: 'true', turntask: 'false' },
      { id: 2, name: '卡纸故障', date: '2018-12-18', checked: 'true', turntask: 'true' },
      { id: 3, name: '故障报错', date: '2018-12-18', checked: 'true' },
      { id: 4, name: '预警信息', date: '2018-12-18', checked: 'true' }
    ]
  },
  // tab菜单切换
  tab: function (e) {
    var dataId = e.currentTarget.id;
    var obj = {};
    obj.curHdIndex = dataId;
    obj.curBdIndex = dataId;
    this.setData({
      tabArr: obj
    })
  },
  // 跳转详情页面
  goInfo: function (e) {
    wx.navigateTo({
      url: '/pages/info/info?taskname=' + e.currentTarget.id,
    })
  }
})